package com.w.tank;

public class FourDirFireStrage implements FireStrage {
    @Override
    public void fire(Tank tank) {
        if (!tank.live) return;
        for(Dir dir: Dir.values()){
            int offset_x =  tank.getX() + Tank.WIDTH/2 - Bullet.WIDTH/2;
            int offset_y = tank.getY() + Tank.HEIGHT/2 - Bullet.HEIGHT/2;
            new Bullet(offset_x, offset_y, dir, tank.getGroup());

        }

    }
}
